package top.fangw;

import lombok.extern.slf4j.Slf4j;
import top.fangw.common.generator.util.GeneratorUtil;
import top.fangw.common.generator.util.ScannerUtil;

/**
 * @description: ${description}
 * @author: fgw
 * @createDate: 2024/1/12
 */
@Slf4j
public class Main {
    public static void main(String[] args) {
        String ip = ScannerUtil.scanner("请输入数据库ip");
        String port = ScannerUtil.scanner("请输入数据库端口");
        String name = ScannerUtil.scanner("请输入数据库名称");
        String username = ScannerUtil.scanner("请输入数据库username");
        String password = ScannerUtil.scanner("请输入数据库password");
        String module = ScannerUtil.scanner("请输入module名称 例：cloud-common/common-generator");
        String packageName = ScannerUtil.scanner("请输入包名");
        String tables = ScannerUtil.scanner("请输入表名，多个英文逗号分隔？所有输入 all");
        GeneratorUtil.generator(ip, port, username, password, name, module, packageName, tables);
        log.info("代码生成成功");
    }
}